package be.fedict.eid.diagnostics.system.windows.proxies;

import com.sun.jna.Native;
import com.sun.jna.platform.win32.WinNT.HANDLE;
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.win32.StdCallLibrary;

public interface Psapi extends StdCallLibrary {

	Psapi INSTANCE = (Psapi) Native.loadLibrary("Psapi", Psapi.class);
	
	/**
	 * Retrieves a handle for each module in the specified process.
	 * To control whether a 64-bit application enumerates 32-bit modules, 
	 * 64-bit modules, or both types of modules, use the 
	 * EnumProcessModulesEx function.
	 * 
	 * http://msdn.microsoft.com/en-us/library/ms682631(VS.85).aspx
	 */
	boolean EnumProcessModules(
			HANDLE hProcess, 
			HANDLE[] lphModule,
			int cb, 
			IntByReference lpcbNeededs);
	
	/**
	 * Retrieves the base name of the specified module.
	 * 
	 * http://msdn.microsoft.com/en-us/library/ms683196(VS.85).aspx
	 */
	int GetModuleBaseNameA(
			HANDLE hProcess,
			HANDLE handle,
			byte[] name,
			int nSize);
	
}
